package com.qst.system.service.impl;

import com.qst.system.domain.vo.RefundVo;
import com.qst.system.mapper.RefundMapper;
import com.qst.system.service.IRefundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class RefundServiceImpl implements IRefundService {

    @Autowired
    private RefundMapper refundMapper;

    @Override
    public RefundVo selectRefundById(Long id) {
        RefundVo refundVo = refundMapper.selectRefundById(id);
        System.out.println(refundVo);
        return refundMapper.selectRefundById(id);
    }

    @Override
    public int insertRefund(RefundVo refund) {
        return refundMapper.insertRefund(refund);
    }

    @Override
    public int updateRefund(RefundVo refund) {
        return refundMapper.updateRefund(refund);
    }

    @Override
    public int deleteRefundById(Long id) {
        return refundMapper.deleteRefundById(id);
    }

    @Override
    public int deleteRefundByIds(Long[] ids) {
        return refundMapper.deleteRefundByIds(ids);
    }

    @Override
    public List<RefundVo> selectRefundList(RefundVo refund) {
        List<RefundVo> refundVos = refundMapper.selectRefundList(refund);
        return refundVos;
    }
}
